package com.yljk.homedoctor;

import android.content.Context;
import android.graphics.Bitmap;
import android.os.Bundle;

import com.alibaba.android.arouter.launcher.ARouter;
import com.google.android.exoplayer.C;
import com.yljk.servicemanager.constants.RouterApi;
import com.yljk.servicemanager.interfaceapi.HomeBackApi;

public class HomeUtils {

    public static void push(Context context, String pluginId, String conponentName){
        HomeBackApi homeBackApi = (HomeBackApi) ARouter.getInstance().build(RouterApi.HOMEONCLICKIMPL).navigation();
        homeBackApi.push(context,pluginId,conponentName);
    }

    public static void push(Context context, String pluginId, String conponentName, Bundle bundle){
        HomeBackApi homeBackApi = (HomeBackApi) ARouter.getInstance().build(RouterApi.HOMEONCLICKIMPL).navigation();
        homeBackApi.push(context,pluginId,conponentName,bundle);
    }

    public static void shareWxImg(Bitmap bitmap, String openId){
        HomeBackApi homeBackApi = (HomeBackApi) ARouter.getInstance().build(RouterApi.HOMEONCLICKIMPL).navigation();
        homeBackApi.shareWxImg(bitmap,openId);
    }

    public static void moveLive(){
        HomeBackApi homeBackApi = (HomeBackApi) ARouter.getInstance().build(RouterApi.HOMEONCLICKIMPL).navigation();
        homeBackApi.moveLive();
    }

    public static void toJumeLive(int id){
        HomeBackApi homeBackApi = (HomeBackApi) ARouter.getInstance().build(RouterApi.HOMEONCLICKIMPL).navigation();
        homeBackApi.toJumeLive(id);
    }
    public static void toJumeLiveClient(int id,int client){
        HomeBackApi homeBackApi = (HomeBackApi) ARouter.getInstance().build(RouterApi.HOMEONCLICKIMPL).navigation();
        homeBackApi.toJumeLivePage(id,client);
    }

    public static long String2Long(String s){
        if (s==null || s.equals("") || s.isEmpty()){
            return 0;
        }else{
            return Long.valueOf(s).longValue();
        }
    }


    public static void toJumeMeetProtocal(int id) {
        HomeBackApi homeBackApi = (HomeBackApi) ARouter.getInstance().build(RouterApi.HOMEONCLICKIMPL).navigation();
        homeBackApi.toJumeMeetProtocal(id);
    }


    public static void toJumeMeetList() {
        HomeBackApi homeBackApi = (HomeBackApi) ARouter.getInstance().build(RouterApi.HOMEONCLICKIMPL).navigation();
        homeBackApi.toJumeMeetList();
    }

    public static void toJumpMeeting(int meetingId) {
        HomeBackApi homeBackApi = (HomeBackApi) ARouter.getInstance().build(RouterApi.HOMEONCLICKIMPL).navigation();
        homeBackApi.toJumpMeeting(meetingId);
    }

    public static void toJumpMeetcreate(int id) {
        HomeBackApi homeBackApi = (HomeBackApi) ARouter.getInstance().build(RouterApi.HOMEONCLICKIMPL).navigation();
        homeBackApi.toJumpMeetcreate(id);
    }

    public static void toJumeLiveList(){
        HomeBackApi homeBackApi = (HomeBackApi) ARouter.getInstance().build(RouterApi.HOMEONCLICKIMPL).navigation();
        homeBackApi.toJumeLiveList();
    }

    public static void toWeClassMore(){
        HomeBackApi homeBackApi = (HomeBackApi) ARouter.getInstance().build(RouterApi.HOMEONCLICKIMPL).navigation();
        homeBackApi.toWeClassMore();
    }

    public static void toWeClassItem(int album_id){
        HomeBackApi homeBackApi = (HomeBackApi) ARouter.getInstance().build(RouterApi.HOMEONCLICKIMPL).navigation();
        homeBackApi.toWeClassItem(album_id);
    }

    public static void toBannerClick(String urlString){
        HomeBackApi homeBackApi = (HomeBackApi) ARouter.getInstance().build(RouterApi.HOMEONCLICKIMPL).navigation();
        homeBackApi.toBannerClick(urlString);

    }

    public static void toScheme(Context context,String urlString){
        HomeBackApi homeBackApi = (HomeBackApi) ARouter.getInstance().build(RouterApi.HOMEONCLICKIMPL).navigation();
        homeBackApi.toScheme(context,urlString);
    }

}
